const db = require('../serve/db.js')

function result(status,data,msg){
    this.status = status;
    this.data = data || {};
    this.msg = msg;
}

function delComment(req,res){
    let data = {
        hash:req.query.hash || 0
    };
    if(!data.hash){
        res.send(new result(110,'','ID不正确！'));
        return
    }
    db.deleteOne('Commit',data);
    res.send(new result(200,{},'删除成功'))
}

module.exports = delComment